/**
 * @author 长矛
 * @description 业务通用code
 *
 */
class ResultCode {

    /***********************************/
    /**
     * code
     */
    code;
    /**
     * 说明
     */
    desc;

    constructor(code, desc) {
        this.code = code;
        this.desc = desc;
    }

    /************************************/

    static SUCCESS = new ResultCode(200, '成功');
    static VALIDATE_FAILED = new ResultCode(400, '参数校验失败');
    static UNAUTHENTICATED=new ResultCode(401,'由于未携带token或token过期导致请求未通过身份验证')
    static PERMISSION_DENIED=new ResultCode(403,'携带的token没有足够权限')
    static API_NOT_FOUNT = new ResultCode(404, '接口不存在');
    static UNKNOWN_ERTOR=new ResultCode(500,"未知错误")

}

module.exports =ResultCode